fi = open("arrogant.txt","r")
fo = open("PY301-1.txt","w")
txt = fi.read()
d = {}
for i in txt:
    d[i] = d.get(i,0)+1
# 不统计换行符 空格
del d['\n']
del d[' ']
ls = list(d.items())
for i in range(len(ls)):
    fo.write("{}:{}\n".format(ls[i][0],ls[i][1]))
fo.close()
fi.close()


        
